package com.ruitu.health_2.mvp.model;

import com.ruitu.arad.api.RxUtil;
import com.ruitu.arad.base.BaseModel;
import com.ruitu.health_2.dao.http.APIRetrofit;
import com.ruitu.router_module.bean.BaseResult2;
import com.ruitu.router_module.bean.PageModel2;
import com.ruitu.router_module.bean.home.AdvertContent;
import com.ruitu.router_module.bean.home.MallHomeData;
import com.ruitu.router_module.bean.product.ProHome;

import io.reactivex.Observable;

public class MallModel {

    public static class MallHomeM extends BaseModel {
        public Observable<BaseResult2<MallHomeData>> reqMallHomeData() {
            return APIRetrofit.getDefault()
                    .reqMallHomeData()
                    .compose(RxUtil.<BaseResult2<MallHomeData>>subIoObMain());
        }

        public Observable<BaseResult2<PageModel2<AdvertContent<ProHome>>>> reqMallProList(String posId, int size, int num) {
            return APIRetrofit.getDefault()
                    .reqMallProListByTab(posId, size, num)
                    .compose(RxUtil.<BaseResult2<PageModel2<AdvertContent<ProHome>>>>subIoObMain());
        }
    }
}